package org.jianfa.learn;

import java.beans.PropertyEditorSupport;

public class CarTypeEditor extends PropertyEditorSupport {

    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        String[] texts = text.split(";");
        Car car = new Car();
        car.setBrand(texts[0]);
        car.setColor(texts[1]);
        setValue(car);
    }
}
